colinuxfandomcom-20200214-history
Getting Started with coLinux
coLinux is a wonderful tool for running Linux under Windows; it allows you to run a full-fledged Linux computer with no extra partitions, inside Windows. More information can be found at the home page. Those values are based on personal experience; your mileage may vary. Note: This is non-swappable memory, so using too much can do bad things to your computer while coLinux is running. (as soon as you reboot, everything will be fine). It used to default to 29MB which was sufficient for most things, now it seems to default to 64MB. If you have less than 256MB of RAM you probably want to make it smaller. Realistically, unless you want to use X Windows (described later) or use a very memory-intensive program, 32MB or even 16MB may be enough. Oh, if you want, you can also tell coLinux your keyboard is not US with a command line like loadkeys fr-latin1. (For remapping your keyboard check coLinuxKBD) Configuring the network. This is not strictly necessary to enjoy coLinux, but you need it to: *download new software: the image you downloaded contains only a basic system, much like a bare Windows installation *Use ssh and PuTTY, a nice terminal since you will find the console too uncomfortable *launch X applications and run VNC and see the results on your Windows screen =Running coLinux= c:\>cd coLinux c:\coLinux>colinux-daemon.exe @example.conf or, to use an NT type command shell as the terminal: c:\coLinux>colinux-daemon.exe -t nt @example.conf *To enable a double-click start, create a short-cut to the daemon (right-click and select Create Shortcut), then right-click on that new shortcut and select Properties. In the Target box (under the Shortcut tab), add the following to the end of the existing text (after the double-quote): "@example.conf" and click OK. Don't forget the space before the @, Vista needs this in quotes! You can now double-click the shortcut (perhaps copy it to your desktop) to run CoLinux. If you would like to start the console minimised, select Minimized from the Run drop-down box. *Alternatively, you can put the following into a bat file such as coLinux.bat which you can double click: start "coLinux" /Dc:\colinux /min colinux-daemon.exe @example.conf Remove /min if you want to see the boot messages. Change the /D to point to your coLinux dir. *In another few seconds, a colinux-console should pop up. And after a few more seconds, it should stop and give you a login prompt. Since the default Debian image has no other users, you must log in as root: *The login for the debian image is root/root, you should change this. :2.4 distros - blank password :2.6 distros - "root" as password Now you can use adduser to add another user for normal use, or passwd to set the root password. And you have Linux! Brushing the Dust off a Downloaded Root FS http://colinux.wikia.com/index.php?title=Getting_Started_with_coLinux&action=edit&section=10Edit The Debian Root filesystems are a little long in the tooth. DebianRootFsImages is a procedure to bring the system up-to-date so that it is actually usable. =Using Other Linux Distributions in coLinux= The vanilla Debian may not be to your liking, or it may just seem a little hard to set up. You can find the instructions for installing just about any 32bit distribution here: Easy_way_to_port_native/vm_distro_to_coLinux, or for using an already installed dual boot distro (propably outdated) ConvertingDistributions. If you would like to use the Gentoo Deluxe 2 GB image look here: GentooDeluxHowto, or if you would like to use Topologi Linux look here:TopoHowTo. You can also download via BitTorrent a pre-configured coLinux setup based on coLinux-0.6.0 and the Debian filesystem - just download, extract, install, run. =Troubleshooting= coLinux doesn't start http://colinux.wikia.com/index.php?title=Getting_Started_with_coLinux&action=edit&section=13Edit *check the path to the uncompressed filesystem image *in the line with root=/dev/cobd0 add ro with space between: root=/dev/cobd0 ro :and be ready to remove it if it doesn't help. You can keep it. It is harmless in most cases. (some distributions need it) *Finally, take a close look at your text editor. It may have converted the text silently to UTF-8, adding an invisible marker at the beginning of your configuration file. Switch to hexadecimal mode or to another editor and check the top of the file. If you see the UTF-8 marker, erase it. *in case of an error similar to daemon: exit code 84a08401 daemon: error - CO_RC_ERROR_ERROR, line 33, file colinux/os/current/user/file.o :Repeat the following dance: colinux-daemon.exe --remove-driver colinux-daemon.exe --install-driver If that doesn't work, you can check your parameters in the config-file. Look for an incorrect or missing image filename, vmlinux path, or swapfile path. Comment out all unneeded config-file parameters to help find the cause of the problem. *Add -v 3 to the colinux-daemon options, to see more verbose messages. *If none of these things work, you can try Nitin Jain's install notes (listed in External references). Very good step-by-step directions =Adding Swap Space= *To add swap for use in your coLinux environment you need a blank file with the correct size of swap you want. Here is a location of a number of sizes of empty partitions. *Add the name of the file you downloaded, per the line below, to your configuration file (example.conf). Be sure to set the path too. cobd1=c:\coLinux\swap *Boot your coLinux system. *Login as root *Add the line below to /etc/fstab: /dev/cobd1 none swap sw 0 0 *Run "mkswap /dev/cobd1" *Run "swapon -a" Important Note for Gentoo Users http://colinux.wikia.com/index.php?title=Getting_Started_with_coLinux&action=edit&section=15Edit Gentoo requires configuration of a swap file. Follow the instructions at AddSwapPartition =Network= see Network#Recommended_Setup See Network#The_WinPCAP_driver See Network#TAP See Network#Slirp =Graphical Interface (Xserver)= The article XCoLinux explains how to run an X server on the Host and xclient applications in coLinux =External Resources= :Nitin Jain's install notes 2006-07. :Evan Danaher's notes 2005 or earlier. :coLinux+Debian on Windows XP-Pro install notes2008-2019 colinux-daemon.exe --remove-driver colinux-daemon.exe --install-driver = Filesystem Download = From the main download site, also download a filesystem which includes an operating system. Debian-3.0r2.ext3-mit-backports.1gb.bz2 on SourceForge is a good choice. It expands to 1GB when decompressed. This has a basic Debian image on it with everything you need to get started. Save/extract this in the coLinux directory. Here is a partial list of programs which can extract the image, which is compressed using bzip2: *bzip2 for windows on redhat *bzip2 for Windows, from GnuWin32 or GetGnuWin32 *tar and bunzip2, included in unxutils or cygwin *winrar *7Zip Run bzip2 on Windows command line: bzip2-102-x86-win32.exe -d Debian-3.0r2.ext3-mit-backports.1gb.bz2 = Configuration = coLinux can be configured using parameters on the command line, or with a configuration file like default.colinux.xml. For command-line options, see README. Here are the contents on an example file called coLinux.bat ("^" is the line continuation character in Windows).: Uses eth1 to talk to Hosting OS, eth0 for for Internet connectivity colinux-daemon.exe kernel=vmlinux initrd=initrd.gz ^ cobd0="Debian-20040605-mit.ext3.1610mb" ^ cobd1="fs_768Mb" ^ mem=512 ^ eth0=pcap-bridge,"Local Area Connection" ^ eth1=tuntap ^ root=/dev/cobd0 Use ssh (port 22) or VNC (port 5901) to connect to coLinux guest system colinux-daemon kernel=vmlinux ^ cobd0=Debian-"c:\coLinux\20040605-mit.ext3.1610mb" ^ cobd1="c:\coLinux\fs_768Mb" ^ mem=512 ^ eth0=slirp,,tcp:22:22/tcp:5901:5901 ^ eth1=tuntap ^ root=/dev/cobd0 The option''' cobd0''' represents a partition. Partitions are mounted under /dev/cobdn, where n is given by the index passed to it, and the path is fairly straightforward. Make sure that the first one (index="0") points to your root filesystem (e.g., the Debian image). cobd0="c:\coLinux\Debian-3.0r2.ext3-mit-backports.1gb" You may want to disable the swap device for now; it's not strictly necessary and will be described later. It's no problem, if the file does not exist at this point: cobd1="c:\coLinux\swap_file" The other options will work as-is. Memory You can take a quick look at the mem=64 line and adjust it to fit your system. This is the physical amount of RAM you are going to allocate to coLinux, and you need to keep some for Windows. Those values are based on personal experience; your mileage may vary. Note: This is non-swappable memory, so using too much can do bad things to your computer (while coLinux is running; as soon as you reboot, everything will be fine). It used to default to 29MB which was sufficient for most things, now it seems to default to 64MB. If you have less than 256MB of RAM you probably want to make it smaller. Realistically, unless you want to use X Windows (described later) or use a very memory-intensive program, 32MB or even 16MB may be enough. Oh, if you want, you can also tell coLinux your keyboard is not US with a command line like loadkeys fr-latin1. (For remapping your keyboard check coLinuxKBD) Then you have to configure the network. This is not strictly necessary to enjoy coLinux, but you need it to: * download new software: the image you downloaded contains only a basic system, much like a bare Windows installation * use ssh and PuTTY, a nice terminal since you will find the console too uncomfortable * launch X applications and run VNC and see the results on your Windows screen = Running coLinux = c:\>cd coLinux c:\coLinux>colinux-daemon.exe @example.conf or, to use a command shell as the terminal: c:\coLinux>colinux-daemon.exe -t nt @example.conf *To enable a double-click start, create a short-cut to the daemon (right-click and select Create Shortcut), and then right-click on that new shortcut and select Properties. In the Target box (under the Shortcut tab), add the following to the end of the existing text (after the double-quote): "@example.conf" and click OK. Don't forget the space before the @, Vista needs this in quotes! You can now double-click the shortcut (perhaps copy it to your desktop) to run CoLinux. If you would like to start the console minimised, select Minimized from the Run drop-down box. *Alternatively, you can put the following into a bat file such as coLinux.bat which you can double click: start "coLinux" /Dc:\colinux /min colinux-daemon.exe @example.conf Remove /min if you want to see the boot messages. Change the /D to point to your coLinux dir. *In another few seconds, a colinux-console should pop up. And after a few more seconds, it should stop and give you a login prompt. Since the Debian image by default has no other users, you must log in as root: *The login for the debian image is root/root, you should change this. : 2.4 distros - blank password : 2.6 distros - "root" as password Now you can use adduser to add another user for normal use, or passwd to set the root password. And you have Linux! Brushing the Dust off a Downloaded Root FS The Debian Root filesystems are a little long in the tooth. DebianRootFsImages is a procedure to bring the system up-to-date so that it is actually usable. = Using Other Linux Distributions in coLinux = The vanilla Debian may not be to your liking, or it may just seem a little hard to set up. You can find the instructions for installing just about any 32bit distribution here: Easy_way_to_port_native/vm_distro_to_coLinux, or for using an already installed dual boot distro (propably outdated) ConvertingDistributions. If you would like to use the Gentoo Deluxe 2 GB image look here: GentooDeluxHowto, or if you would like to use Topologi Linux look here: TopoHowTo. You can also download via BitTorrent a pre-configured coLinux setup based on coLinux-0.6.0 and the Debian filesystem - just download, extract, install, run. = Troubleshooting = coLinux doesn't start * check the path to the uncompressed filesystem image * in the line with root=/dev/cobd0 add ro with space between: root=/dev/cobd0 ro :and be ready to remove it if it doesn't help. You can keep it. It is harmless in most cases (some distributions need it) * finally, take a close look at your text editor. It may have converted the text silently to UTF-8, adding an invisible marker at the beginning of your configuration file. Switch to hexadecimal mode or to another editor and check the top of the file. If you see the UTF-8 marker, erase it. *in case of a error similar to daemon: exit code 84a08401 daemon: error - CO_RC_ERROR_ERROR, line 33, file colinux/os/current/user/file.o :Repeat the following dance: colinux-daemon.exe --remove-driver colinux-daemon.exe --install-driver If that doesn't work you can check your parameters in the config-file. Look for an incorrect or missing image filename, vmlinux path, or swapfile path. Comment out all unneeded config-file parameters to see which might be incorrect. *Add -v 3 to the colinux-daemon options, to see more verbose messages. * If none of these things work, you can try Nitin Jain's install notes (listed in External references). Very good step-by-step directions = Adding Swap Space = * To add swap for use in your coLinux environment you need a blank file with the correct size of swap you want. Here is a location of a number of sizes of empty partitions. * Name the file you downloaded per the line below into your configuration file (example.conf). Be sure to set the path too. cobd1=c:\coLinux\swap * Boot into your coLinux system. * Login as root * Add the line below to /etc/fstab: /dev/cobd1 none swap sw 0 0 * Run "mkswap /dev/cobd1" * Run "swapon -a" Important Note for Gentoo Users Gentoo requires configuration of a swap file. Follow the instructions at AddSwapPartition = Network = see Network#Recommended_Setup See Network#The_WinPCAP_driver See Network#TAP See Network#Slirp = Graphical Interface (Xserver) = The article XCoLinux explains how to run an X server on the Host and xclient applications in coLinux = External Resources = :Nitin Jain's install notes 2006-07. :Evan Danaher's notes 2005 or earlier. :coLinux+Debian on Windows XP-Pro install notes2008-2019 |}